<?php
class View_Administration_Module_List extends View_Administration_Module
{
	public function buildContent()
	{
		$words		= $this->words['module']['listInstalled'];
		$list		= array();
		$modules	= Logic_Module::getInstalledModules();
		foreach( $modules as $module )
		{
			$module['link']	= $this->request->get( 'link' );
			$list[]	= $this->loadTemplate( 'administration.module.listitem', $module );
		}
		$ui		= array(
			'words'		=> $words,
			'list'		=> join( $list ),
			'buttonAdd'	=> $this->html->LinkButton(
				self::getUrl( array( 'action' => 'addModule' ) ),
				$words['buttonAdd'],
				'but add'
			),
		);

		return $this->loadTemplate( 'administration.module.list', $ui );
	}
}
?>